import requests
import json

params = {
"type": "24",
"interval_id": "100:90",
"action": "",
"start": 0,
"limit": 20
}

url = "https://movie.douban.com/j/chart/top_list"
# response = requests.get(url,params=params)
# print(response.request.url)
# print(response.text) //被反扒
# print(response.request.headers)

headers = {
    "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
}
response = requests.get(url,params=params,headers=headers)
data = response.text
# print(data)
response.close()
top_list = json.loads(data)
# print(top_list)
for item in top_list:
    print(item)